
import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Order/"
import { getShopUrls, getBaseUrl } from "@/utils/appUrls.js"

//获取提交订单信息
export function getProductDataBySubmit(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getProductDataBySubmit",
        data,
    })
}
//提交订单
export function submitOrderByUserCar(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "submitOrderByUserCar",
        data,
    })
}
//线下支付
export function offlinePay(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "offlinePay",
        data,
    })
}

//对账单列表
export function getAccountList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getAccountList",
        data,
    })
}

//对账单详情
export function getAccountModel(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getAccountModel?id=" + data.id,
        data,
    })
}

//获取订单详情
export function getOrderDetail(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getOrderDetail?orderId=" + data.orderId,
    })
}

//取消订单
export function orderCancel(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "orderCancel?orderId=" + data.orderId,
        data,
    })
}

//支付订单
export function payOrder(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "payOrder?orderId=" + data.orderId,
        data,
    })
}

//确认订单
export function takeOrder(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "takeOrder?orderId=" + data.orderId,
        data,
    })
}
//订单退货
export function OrderReturnApply(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderReturnApply",
        data,
    })
}

//订单退款
export function OrderRefundApply(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderRefundApply",
        data,
    })
}

//获取用户订单列表
export function getUserOrderList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getUserOrderList",
        data,
    })
}

//订单评价
export function OrderComment(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderComment",
        data,
    })
}

//添加备注
export function AddOrEditOrderRemark(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "AddOrEditOrderRemark",
        data,
    })
}
//获取支付信息
export function GetPayOrderId(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetPayOrderId" + path,
    })
}
//订单支付分批
export function XianPayNew(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "XianPayNew",
        data,
    })
}
//付款记录
export function GetPayListByOrderId(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetPayListByOrderId",
        data,
    })
}
//云支付提交支付订单(银联支付微信小程序)
export function HelPayOrder(data, path) {
    return http.post({
        url: getBaseUrl() + serviceName + "HelPayOrder" + path,
        data,
    })
}

//申请退款
export function OrderRefundApplyExchange(data, path = "") {
    return http.post({
        url: getBaseUrl() + serviceName + "OrderRefundApplyExchange" + path,
        data,
    })
}

//作废退款单
export function CancelRefundApplyOrder(data, path = "") {
    return http.post({
        url: getBaseUrl() + serviceName + "CancelRefundApplyOrder" + path,
        data,
    })
}

//退款单详情
export function GetRefundDetail(data, path = "") {
    return http.post({
        url: getBaseUrl() + serviceName + "GetRefundDetail" + path,
        data,
    })
}
//发货记录
export function GetDeliveryRecord(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetDeliveryRecord" + path,
    })
}
// 获取多供应商运费
export function GetOrderPostage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetOrderPostage",
        data,
    })
}
// 多供应商合单购物车提交订单
export function SubmitMergeOrder(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SubmitMergeOrder",
        data,
    })
}
// 多供应商合并订单提交支付
export function MergeOrderPay(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "MergeOrderPay",
        data,
    })
}
//供应商合并订单支付
export function XianPayMerge(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "XianPayMerge",
        data,
    })
}
//
export function GetPostageTypeList() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetPostageTypeList",
    })
}
//订单留言标签
export function GetRemarkLabelList() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetRemarkLabelList",
    })
}
//获取可用的订单项目
export function GetUsableOrderProjectList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetUsableOrderProjectList",
        data,
    })
}
//保存发票(修改,重新申请)
export function SaveOrderInvoice(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SaveOrderInvoice",
        data,
    })
}
//保存用户发票信息
export function SaveInvoice(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SaveInvoice",
        data,
    })
}
//获取订单发票列表
export function GetOrderInvoiceList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetOrderInvoiceList?State=" + data.State,
        data,
    })
}
//发票撤销申请
export function CancleOrderInvoice(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "CancleOrderInvoice?id=" + data.id,
        data,
    })
}
//获取订单发票详情
export function GetOrderInvoice(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetOrderInvoice?id=" + data.id,
        data,
    })
}
//获取用户发票信息
export function GetInvoiceModel(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetInvoiceModel",
        data,
    })
}

//判断是否显示开票中心
export function GetIsOpenInvoice() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetIsOpenInvoice",
    })
}

//获取订单项目列表
export function GetOrderProjectList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetOrderProjectList",
        data,
    })
}
//申请项目
export function SaveOrderProject(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SaveOrderProject",
        data,
    })
}
//关联订单
export function GetUsableOrderList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetUsableOrderList",
        data,
    })
}
export function GetOrderInfoByNumber(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetOrderInfoByNumber" + path,
    })
}
export function GetAccountListNew(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAccountListNew",
        data,
    })
}
export function GetAccountModelNew(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAccountModelNew",
        data,
    })
}
export function GetAccountListErp(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAccountListErp",
        data,
    })
}
export function GetAccountModelErp(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAccountModelErp",
        data,
    })
}
export function GetIsValetOrderPay() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetIsValetOrderPay",
    })
}
export function GetAccountModelGoodNew(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAccountModelGoodNew",
		data
    })
}

// 店铺中心订单（按推荐人的订单列表）
export function GetInvitUserOrderList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetInvitUserOrderList",
		data
    })
}
